﻿namespace Agent
{
    using System;
    using System.CodeDom.Compiler;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Runtime.CompilerServices;
    using System.Threading;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Input;
    using System.Windows.Markup;

    [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
    public class HelpWindow : Window, IComponentConnector
    {
        internal Image a;
        internal Label b;
        internal Label c;
        internal Label d;
        internal Label e;
        internal Label f;
        internal Label g;
        internal Label h;
        internal Label i;
        internal Label j;
        internal Label k;
        private bool l;
        [CompilerGenerated]
        private static ParameterizedThreadStart m;

        public HelpWindow()
        {
            this.InitializeComponent();
            this.a();
        }

        protected void a()
        {
            this.d.Content = e.c("LinkNameFaq");
            this.h.Content = e.c("LinkNameLogin");
            this.f.Content = e.c("LinkNameMain");
            this.b.Content = e.c("LinkNameSetup");
            this.j.Content = e.c("LinkNameTicket");
            this.e.Content = "http://thesafety.us/" + e.b() + "/mistakes__vpn/";
            this.e.Tag = "http://thesafety.us/" + e.b() + "/mistakes_vpn/";
            this.i.Content = "https://thesafety.us/billing/";
            this.i.Tag = "https://thesafety.us/billing/";
            this.g.Content = "http://thesafety.us/";
            this.g.Tag = "http://thesafety.us/";
            this.c.Content = "http://thesafety.us/" + e.b() + "/faq/";
            this.c.Tag = "http://thesafety.us/" + e.b() + "/faq/";
            this.k.Content = e.c("LinkNameTicketLink");
            this.k.Tag = "https://thesafety.us/support/index.php?_m=tickets&_a=submit&languageid=" + ((e.b() == "en") ? 1 : ((e.b() == "ru") ? 2 : 3));
            base.Title = e.c("HelpWindowTitle");
        }

        [CompilerGenerated]
        private static void a(object A_0)
        {
            Process.Start(A_0.ToString());
        }

        [EditorBrowsable(EditorBrowsableState.Never), DebuggerNonUserCode]
        private void a(int A_0, object A_1)
        {
            switch (A_0)
            {
                case 1:
                    this.a = (Image) A_1;
                    return;

                case 2:
                    this.b = (Label) A_1;
                    return;

                case 3:
                    this.c = (Label) A_1;
                    this.c.MouseLeftButtonUp += new MouseButtonEventHandler(this.lblTicketLink_MouseLeftButtonUp);
                    return;

                case 4:
                    this.d = (Label) A_1;
                    return;

                case 5:
                    this.e = (Label) A_1;
                    this.e.MouseLeftButtonUp += new MouseButtonEventHandler(this.lblTicketLink_MouseLeftButtonUp);
                    return;

                case 6:
                    this.f = (Label) A_1;
                    return;

                case 7:
                    this.g = (Label) A_1;
                    this.g.MouseLeftButtonUp += new MouseButtonEventHandler(this.lblTicketLink_MouseLeftButtonUp);
                    return;

                case 8:
                    this.h = (Label) A_1;
                    return;

                case 9:
                    this.i = (Label) A_1;
                    this.i.MouseLeftButtonUp += new MouseButtonEventHandler(this.lblTicketLink_MouseLeftButtonUp);
                    return;

                case 10:
                    this.j = (Label) A_1;
                    return;

                case 11:
                    this.k = (Label) A_1;
                    this.k.MouseLeftButtonUp += new MouseButtonEventHandler(this.lblTicketLink_MouseLeftButtonUp);
                    return;
            }
            this.l = true;
        }

        [DebuggerNonUserCode]
        public void InitializeComponent()
        {
            if (!this.l)
            {
                this.l = true;
                Uri resourceLocator = new Uri("/TheSafety;component/helpwindow.xaml", UriKind.Relative);
                Application.LoadComponent(this, resourceLocator);
            }
        }

        private void lblTicketLink_MouseLeftButtonUp(object A_0, MouseButtonEventArgs A_1)
        {
            if ((A_0 as Label).Tag != null)
            {
                if (m == null)
                {
                    m = new ParameterizedThreadStart(HelpWindow.a);
                }
                new Thread(m).Start((A_0 as Label).Tag.ToString());
            }
        }
    }
}

